package com.aidex.system.service;

import com.aidex.common.core.domain.TreeNode;
import com.aidex.common.core.domain.entity.SysDept;
import com.aidex.common.core.service.BasicTreeService;
import com.alibaba.fastjson2.JSONObject;

import java.util.List;
import java.util.Map;

public interface SysDeptService extends BasicTreeService<SysDept> {

    List<String> selectDeptIdsByRoleId(String roleId);

    boolean hasChildByDeptId(String id);

    boolean checkDeptExistUser(String id);

    void checkDeptNameUnique(SysDept dept);

    List<TreeNode> buildDeptTreeExcludeChild(int level, String parentId, String excludeId);

    List<TreeNode> buildDeptTree(int level, String parentId);

    List<TreeNode> search(String searchText);

    List<TreeNode> buildDeptSelectUserTree(int level, String parentId);

    List<TreeNode> searchDeptUserList(SysDept dept);

    SysDept selectDeptByDeptCode(String deptCode);

    void checkDeptDataScope(String deptId);

    void refreshCache();

    void loadingDeptCache();

    boolean remove(SysDept sysDept);

}
